import { PORT1 } from "@/api/config/servicePort";
import Http from "@/api/index";

export const AddRoute = (params: any) => {
  return Http.post(PORT1 + "/system/menu/add", params);
};

export const EditRoute = (params: any) => {
  return Http.put(PORT1 + "/system/menu/edit", params);
};

export const deleteRoute = (params: any) => {
  return Http.post(PORT1 + "/system/menu/delete", params);
};

export const GetBtns = (params: any) => {
  return Http.get(PORT1 + "/system/menu/btns", params);
};

export const GetBtnsGroup = () => {
  return Http.get(PORT1 + "/system/menu/btn_group");
};

export const AddBtn = (params: any) => {
  return Http.post(PORT1 + "/system/menu/add_btn", params);
};

export const EditBtn = (params: any) => {
  return Http.put(PORT1 + "/system/menu/edit_btn", params);
};

export const DeleteBtn = (params: any) => {
  return Http.post(PORT1 + "/system/menu/delete_btn", params);
};

export const GetApis = (params: any) => {
  return Http.get(PORT1 + "/system/menu/apis", params);
};

export const AddApis = (params: any) => {
  return Http.post(PORT1 + "/system/menu/add_api", params);
};

export const EditApis = (params: any) => {
  return Http.put(PORT1 + "/system/menu/edit_api", params);
};

export const GetApisGroup = () => {
  return Http.get(PORT1 + "/system/menu/api_group");
};
